﻿using System;

class Program
{
    static void Main()
    {
        int juryNumber = int.Parse(Console.ReadLine());
        int[] catVotes = new int[11];
        for (int i = 0; i < juryNumber; i++)
        {
            int cat = int.Parse(Console.ReadLine());
            catVotes[cat]++;
        }
        int winnerCat = 0;
        int biggestVote = 0;
        for (int i = 1; i < catVotes.Length; i++)
        {
            if (catVotes[i] > biggestVote)
            {
                biggestVote = catVotes[i];
                winnerCat = i;
            }
        }
        Console.WriteLine(winnerCat);
    }
}